package com.algorithms.absdatatypes;

import java.util.LinkedList;

public interface TreeNode<K extends Comparable,T>  extends Node<K,T>,Visited
{
	/*
	 * Is this node a root
	 */
    public boolean isRoot();
    /*
	 * Is this node a leaf
	 */
    public boolean isLeaf();
    
    /*
	 * Get the  parent
	 */
    public TreeNode<K,T> getParent();
    
    /*
	 * Set the  parent
	 */
    public void  setParent(TreeNode<K,T> parent);
    
    /*
	 * Get the  children
	 */
    public LinkedList<TreeNode<K,T>> getChildren();
    
    /*
     * Insert a child to the node
     */
    public void insertChild(TreeNode<K,T> item);
    
    /*
     * Insert  children to the node
     */
    public void insertChildren(LinkedList<TreeNode<K,T>> children);
    /*
     * apply any policy if required
     */
    public  void apply(Policy<T> policy);
}
